/*
day310 
2020.7.3 
*/ 
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    int numOfSubarrays(vector<int>& arr, int k, int threshold) {
		int *sum=new int[arr.size()+1];
		int res=0;
		
		sum[0]=0;
		for(int i=0;i<arr.size();++i)
		{
			sum[i+1]=sum[i]+arr[i];
		}
		
		for(int i=k;i<=arr.size();++i)
		{
			if((sum[i]-sum[i-k])/k>=threshold)
			{
				res++;
			}
		}
		return res;
    }
};

int main()
{
	return 0;
 } 
